package com.mars.module.admin.service;

import com.mars.common.response.sys.NewsCategoryResponse;
import com.mars.common.response.sys.SysArticleCategoryResponse;
import com.mars.module.admin.entity.NewsCategory;
import com.mars.module.admin.entity.SysArticleCategory;
import com.mars.common.response.PageInfo;
import com.mars.module.admin.request.SysArticleCategoryRequest;

import java.util.List;

/**
 * 文章分类接口
 *
 * @author mars
 * @date 2024-03-18
 */
public interface ISysArticleCategoryService {
    /**
     * 新增
     *
     * @param param param
     * @return SysArticleCategory
     */
    SysArticleCategory add(SysArticleCategoryRequest param);

    /**
     * 删除
     *
     * @param id id
     * @return boolean
     */
    boolean delete(Long id);

    /**
     * 批量删除
     *
     * @param ids ids
     * @return boolean
     */
    boolean deleteBatch(List<Long> ids);

    /**
     * 更新
     *
     * @param param param
     * @return boolean
     */
    boolean update(SysArticleCategoryRequest param);

    /**
     * 查询单条数据，Specification模式
     *
     * @param id id
     * @return SysArticleCategory
     */
    SysArticleCategory getById(Long id);

    /**
     * 查询分页数据
     *
     * @param param param
     * @return PageInfo<SysArticleCategory>
     */
    PageInfo<SysArticleCategory> pageList(SysArticleCategoryRequest param);


    /**
     * 查询所有数据
     *
     * @return List<SysArticleCategory>
     */
    List<SysArticleCategory> list(SysArticleCategoryRequest param);

    List<SysArticleCategoryResponse> tree(SysArticleCategoryRequest queryDto);

    List<SysArticleCategoryResponse> getChildren(List<SysArticleCategory> list, Long id);

}
